<?php

namespace app\index\validate;

use think\Validate;

/**
 * auth验证器
 */
class User extends Validate
{

    protected $rule = [
        'email' => 'require|email',
        'username' => 'require|min:2|max:12',
        'password' => 'require|min:6|max:16',
        'repassword' => 'require|confirm:password',
    ];

    protected $message  =   [
        'email.email'       => 'email格式错啦',
        'username.min'      => '昵称最少2个字符',
        'username.max'      => '昵称最多12个字符',
        'password.min'      => '密码最少6个字符',
        'password.max'      => '密码最多16个字符',
        'repassword.confirm'=> 'wtf 两次密码输入不一致',
    ];

}